package com.bto.solar.work.dto.lease;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author 王小波
 * @description:
 * @date 2023/8/1 10:55
 */
@NoArgsConstructor
@Data
public class OperatingBody {
    @JsonProperty("bpMasterBaseDtoList")
    private List<BpMasterBaseDtoListDTO> bpMasterBaseDtoList;
    @JsonProperty("prjProject")
    private PrjProjectDTO prjProject;
    @JsonProperty("prjProjectLeaseItemList")
    private List<PrjProjectLeaseItemListDTO> prjProjectLeaseItemList;
    @JsonProperty("prjProjectAccountList")
    private List<PrjProjectAccountListDTO> prjProjectAccountList;
    @JsonProperty("prjProjectProduct")
    private PrjProjectProductDTO prjProjectProduct;

    @NoArgsConstructor
    @Data
    public static class PrjProjectDTO {
        @JsonProperty("partnersContractNumber")
        private String partnersContractNumber;
        @JsonProperty("documentType")
        private String documentType;
        @JsonProperty("leaseChannel")
        private String leaseChannel;
        @JsonProperty("division")
        private String division;
        @JsonProperty("paymentBpType")
        private String paymentBpType;
        @JsonProperty("leaseDate")
        private String leaseDate;
        @JsonProperty("insuranceFlag")
        private String insuranceFlag;
        @JsonProperty("manufacturerRegno")
        private String manufacturerRegno;
        @JsonProperty("factoryRegno")
        private String factoryRegno;
        @JsonProperty("sellerRegno")
        private String sellerRegno;
        @JsonProperty("lessorCode")
        private String lessorCode;
        @JsonProperty("tenantSignType")
        private String tenantSignType;
        @JsonProperty("sellerSignType")
        private String sellerSignType;
        @JsonProperty("operatorSignType")
        private String operatorSignType;
    }

    @NoArgsConstructor
    @Data
    public static class PrjProjectProductDTO {
        @JsonProperty("planCode")
        private String planCode;
        @JsonProperty("productParaList")
        private List<ProductParaListDTO> productParaList;

        @NoArgsConstructor
        @Data
        public static class ProductParaListDTO {
            @JsonProperty("productParaName")
            private String productParaName;
            @JsonProperty("productParaValue")
            private Double productParaValue;
            @JsonProperty("leaseTermFrom")
            private String leaseTermFrom;
            @JsonProperty("leaseTermTo")
            private String leaseTermTo;
        }
    }

    @NoArgsConstructor
    @Accessors(chain = true)
    @Data
    public static class BpMasterBaseDtoListDTO {
        @JsonProperty("hlsBpMaster")
        private HlsBpMasterDTO hlsBpMaster;
        @JsonProperty("hlsBpMasterAddressList")
        private List<HlsBpMasterAddressListDTO> hlsBpMasterAddressList;
        @JsonProperty("hlsBpMasterBankAccountList")
        private List<HlsBpMasterBankAccountListDTO> hlsBpMasterBankAccountList;

        @NoArgsConstructor
        @Data
        public static class HlsBpMasterDTO {
            @JsonProperty("bpName")
            private String bpName;
            @JsonProperty("idCardNo")
            private String idCardNo;
            @JsonProperty("cellPhone")
            private String cellPhone;
        }

        @NoArgsConstructor
        @Data
        public static class HlsBpMasterAddressListDTO {
            @JsonProperty("address")
            private String address;
            @JsonProperty("addressType")
            private String addressType;
            @JsonProperty("cellPhone")
            private String cellPhone;
            @JsonProperty("cityCode")
            private String cityCode;
            @JsonProperty("districtCode")
            private String districtCode;
            @JsonProperty("countryCode")
            private String countryCode;
            @JsonProperty("provinceCode")
            private String provinceCode;
        }

        @NoArgsConstructor
        @Data
        public static class HlsBpMasterBankAccountListDTO {
            @JsonProperty("bankAccountName")
            private String bankAccountName;
            @JsonProperty("bankAccountNum")
            private String bankAccountNum;
            @JsonProperty("tssBankNum")
            private String tssBankNum;
        }
    }

    @NoArgsConstructor
    @Data
    public static class PrjProjectLeaseItemListDTO {
        @JsonProperty("partnersLeaseItemId")
        private String partnersLeaseItemId;
        @JsonProperty("fullName")
        private String fullName;
        @JsonProperty("producer")
        private String producer;
        @JsonProperty("productModel")
        private String productModel;
        @JsonProperty("installedCapacity")
        private Integer installedCapacity;
        @JsonProperty("description")
        private String description;
        @JsonProperty("moduleQuantity")
        private Integer moduleQuantity;
        @JsonProperty("inverterBrand")
        private String inverterBrand;
        @JsonProperty("inverterModel")
        private String inverterModel;
    }

    @NoArgsConstructor
    @Data
    public static class PrjProjectAccountListDTO {
        @JsonProperty("accountType")
        private String accountType;
        @JsonProperty("accountName")
        private String accountName;
        @JsonProperty("accountNumber")
        private String accountNumber;
        @JsonProperty("tssBankNumber")
        private String tssBankNumber;
    }
}
